UserOwnFormCtl = Ext.extend(FormCtl, {

			configItems : function(config) {

				Ext.apply(Ext.form.VTypes, {
							password : function(val, field) {// val指这里的文本框值，field指这个文本框组件，大家要明白这个意思
								if (field.confirmTo) {// confirmTo是我们自定义的配置参数，一般用来保存另外的组件的id值
									var pwd = Ext.get(field.confirmTo);// 取得confirmTo的那个id的值
									return (val == pwd.getValue());
								}
								return true;
							}
						});

				var newpasswordconfig = {
					fieldLabel : '新密码',
					id : "newpassword",
					name : 'newpassword',
					inputType : 'password',
					height : 20,
					width : 150
				};

				var newpassword = new Ext.form.TextField(newpasswordconfig);

				var conformpasswordconfig = {
					fieldLabel : '新密码确认',
					name : 'conformpassword',
					inputType : 'password',
					vtype : "password",//自定义的验证类型
					vtypeText : "两次密码不一致！",
					confirmTo : "newpassword",//要比较的另外一个的组件的id
					height : 20,
					width : 150
				};

				var conformpassword = new Ext.form.TextField(conformpasswordconfig);

				var items = [this.getTextField('旧密码', 'oldpassword'),
						conformpassword,newpassword]

				this.items = items;

				var groupItems = [{
							columnWidth : .5,
							layout : 'form',// 第一列里面内容就是form排序了,从上到下
							items : [items[0]]
						}, {
							columnWidth : .5,
							layout : 'form',// 第一列里面内容就是form排序了,从上到下
							items : [items[2], items[1]]
						}];

				config.items = groupItems;

				return config;

			},
			getCommonConfig : function() {

				var config = {
					split : true,
					autoScroll : true,
					region : 'center',
					layout : 'column',
					labelAlign : 'right',
					labelWidth : 100
				};

				return config;

			},
			configButtons : function(config) {

				config.buttons = [{
							text : '提交',
							handler : this.submit,
							scope : this
						}, {
							text : '清空',
							handler : function() {
								this.cmp.reset();
							},
							scope : this
						}];

				config.buttonAlign = 'center'

				return config;

			},
			getFormHeight : function() {

				return 280;

			},
			getSubmitUrl : function() {

				return 'user.do?m=modifyPassword';

			},
			getLoadUrl : function() {

				return 'user.do?m=read';

			},
			submitSuccess : function(from, action) {
			},
			getLoadParams : function(record) {
				return {
					id : record.get('id')
				}

			},
			configReader : function(config) {

				config.reader = new Ext.data.JsonReader({
							root : 'items'
						}, [{
									name : 'username',
									mapping : 'username',
									type : 'string'
								}, {
									name : 'password',
									mapping : 'password',
									type : 'string'
								}, {
									name : 'departmentid',
									mapping : 'departmentid',
									type : 'string'
								}])

				return config;

			},
			getParams : function(config) {

				var items = this.getAllItems();

				var params = {
					itemlist : Ext.encode(items)
				};

				config.params = params

				return config;

			},
			getAllItems : function() {

				var oigc = cf.getC('rgc');
				var records = oigc.getSelectList();

				var idList = [];
				for (var i = 0; i < records.length; i++) {
					idList.push({
								id : records[i].get('id')
							});
				}

				return idList;

			},
			load : function() {

			},
			getTextField : function(label, name, allowBlank, maxLength) {

				var config = {
					fieldLabel : label,
					name : name,
					inputType : 'password',
					allowBlank : allowBlank,
					maxLength : maxLength,
					height : 20,
					width : 150
				};

				if (maxLength) {
					config.maxLength = maxLength;
				}

				var item = new Ext.form.TextField(config);

				return item;

			}

		});